/*Domain class of table m_prj_ticket_key*/
package com.mycollab.module.project.domain;

import com.mycollab.core.arguments.ValuedBean;
import com.mycollab.db.metadata.Column;
import com.mycollab.db.metadata.Table;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.ibatis.type.Alias;
import org.hibernate.validator.constraints.Length;

@SuppressWarnings("ucd")
@Table("m_prj_ticket_key")
@Alias("TicketKey")
public class TicketKey extends ValuedBean {
    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column m_prj_ticket_key.id
     *
     * @mbg.generated Sat Apr 20 17:20:23 CDT 2019
     */
    @Column("id")
    private Integer id;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column m_prj_ticket_key.projectId
     *
     * @mbg.generated Sat Apr 20 17:20:23 CDT 2019
     */
    @NotNull
    @Column("projectId")
    private Integer projectid;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column m_prj_ticket_key.ticketId
     *
     * @mbg.generated Sat Apr 20 17:20:23 CDT 2019
     */
    @NotNull
    @Column("ticketId")
    private Integer ticketid;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column m_prj_ticket_key.ticketType
     *
     * @mbg.generated Sat Apr 20 17:20:23 CDT 2019
     */
    @NotEmpty
    @Length(max=45, message="Field value is too long")
    @Column("ticketType")
    private String tickettype;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column m_prj_ticket_key.ticketKey
     *
     * @mbg.generated Sat Apr 20 17:20:23 CDT 2019
     */
    @NotNull
    @Column("ticketKey")
    private Integer ticketkey;

    private static final long serialVersionUID = 1;

    public final boolean equals(Object obj) {
        if (obj == null) { return false;}
        if (obj == this) { return true;}
        if (!obj.getClass().isAssignableFrom(getClass())) { return false;}
        TicketKey item = (TicketKey)obj;
        return new EqualsBuilder().append(id, item.id).build();
    }

    public final int hashCode() {
        return new HashCodeBuilder(1565, 557).append(id).build();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column m_prj_ticket_key.id
     *
     * @return the value of m_prj_ticket_key.id
     *
     * @mbg.generated Sat Apr 20 17:20:23 CDT 2019
     */
    public Integer getId() {
        return id;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table m_prj_ticket_key
     *
     * @mbg.generated Sat Apr 20 17:20:23 CDT 2019
     */
    public TicketKey withId(Integer id) {
        this.setId(id);
        return this;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column m_prj_ticket_key.id
     *
     * @param id the value for m_prj_ticket_key.id
     *
     * @mbg.generated Sat Apr 20 17:20:23 CDT 2019
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column m_prj_ticket_key.projectId
     *
     * @return the value of m_prj_ticket_key.projectId
     *
     * @mbg.generated Sat Apr 20 17:20:23 CDT 2019
     */
    public Integer getProjectid() {
        return projectid;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table m_prj_ticket_key
     *
     * @mbg.generated Sat Apr 20 17:20:23 CDT 2019
     */
    public TicketKey withProjectid(Integer projectid) {
        this.setProjectid(projectid);
        return this;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column m_prj_ticket_key.projectId
     *
     * @param projectid the value for m_prj_ticket_key.projectId
     *
     * @mbg.generated Sat Apr 20 17:20:23 CDT 2019
     */
    public void setProjectid(Integer projectid) {
        this.projectid = projectid;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column m_prj_ticket_key.ticketId
     *
     * @return the value of m_prj_ticket_key.ticketId
     *
     * @mbg.generated Sat Apr 20 17:20:23 CDT 2019
     */
    public Integer getTicketid() {
        return ticketid;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table m_prj_ticket_key
     *
     * @mbg.generated Sat Apr 20 17:20:23 CDT 2019
     */
    public TicketKey withTicketid(Integer ticketid) {
        this.setTicketid(ticketid);
        return this;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column m_prj_ticket_key.ticketId
     *
     * @param ticketid the value for m_prj_ticket_key.ticketId
     *
     * @mbg.generated Sat Apr 20 17:20:23 CDT 2019
     */
    public void setTicketid(Integer ticketid) {
        this.ticketid = ticketid;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column m_prj_ticket_key.ticketType
     *
     * @return the value of m_prj_ticket_key.ticketType
     *
     * @mbg.generated Sat Apr 20 17:20:23 CDT 2019
     */
    public String getTickettype() {
        return tickettype;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table m_prj_ticket_key
     *
     * @mbg.generated Sat Apr 20 17:20:23 CDT 2019
     */
    public TicketKey withTickettype(String tickettype) {
        this.setTickettype(tickettype);
        return this;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column m_prj_ticket_key.ticketType
     *
     * @param tickettype the value for m_prj_ticket_key.ticketType
     *
     * @mbg.generated Sat Apr 20 17:20:23 CDT 2019
     */
    public void setTickettype(String tickettype) {
        this.tickettype = tickettype;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column m_prj_ticket_key.ticketKey
     *
     * @return the value of m_prj_ticket_key.ticketKey
     *
     * @mbg.generated Sat Apr 20 17:20:23 CDT 2019
     */
    public Integer getTicketkey() {
        return ticketkey;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table m_prj_ticket_key
     *
     * @mbg.generated Sat Apr 20 17:20:23 CDT 2019
     */
    public TicketKey withTicketkey(Integer ticketkey) {
        this.setTicketkey(ticketkey);
        return this;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column m_prj_ticket_key.ticketKey
     *
     * @param ticketkey the value for m_prj_ticket_key.ticketKey
     *
     * @mbg.generated Sat Apr 20 17:20:23 CDT 2019
     */
    public void setTicketkey(Integer ticketkey) {
        this.ticketkey = ticketkey;
    }

    public enum Field {
        id,
        projectid,
        ticketid,
        tickettype,
        ticketkey;

        public boolean equalTo(Object value) {
            return name().equals(value);
        }
    }
}